/**
  ******************************************************************************
  * @file    at24c02.h
  * @brief   This file contains all the function prototypes for
  *          the at24c02.c file
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2023 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _AT24C02_H_
#define _AT24C02_H_

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "iic.h"
#include "systick.h"

/* Configuration defines */
#ifdef PROJECT_OUTPUT
#define AT24C02_IIC_NO          $@{iic_no}@$
#else
#define AT24C02_IIC_NO          0
#endif


/* Variables */
extern uint8_t AT24C02DataBuff[1024];

/* Prototypes */
uint8_t AT24C02_Read1Byte(uint8_t no,uint16_t addr);
void AT24C02_Write1Byte(uint8_t no,uint16_t addr,uint8_t data);
void AT24C02_Read(uint8_t no,uint16_t addr,uint8_t *pbuf,uint16_t datalen);
void AT24C02_Write(uint8_t no,uint16_t addr,uint8_t *pbuf,uint16_t datalen);

void DemoAT24C02Init(void);
void DemoAT24C02(void);

#ifdef __cplusplus
}
#endif

#endif /* _AT24C02_H_ */

